//-----------------------------------------------------------------------------------------------------//
//																	                                   //
// opengl_draws.cpp  contains implementation of the opengl_draws									   //
//																									   //
// author	: Eng. Ahmed Yasser																		   //
// data		: 21-01-2015																			   //
//																	                                   //
//-----------------------------------------------------------------------------------------------------//
#include "..\include\opengl_draws.h"

void draw_point(float x, float y, float r, float g, float b, float a)
{
    glPointSize( 2.0f );

	glColor4f(r, g, b, a);
	glBegin( GL_POINTS );        
		glVertex3f(x, y, 0.0);
	glEnd();
}

void draw_line(float width, float sx, float sy, float ex, float ey, float r, float g, float b, float a)
{
	glLineWidth(width);
	glColor4f(r, g, b, a);
	glBegin( GL_LINES );        
		glVertex3f(sx, sy, 0.0);
		glVertex3f(ex, ey, 0.0);
	glEnd();
}

void draw_string(bool large, std::string string, float x, float y, float r, float g, float b, float a)
{
	glColor4f(r, g, b, a);
	glRasterPos3f(x, y, 0.0f);	
	glutBitmapString(large?GLUT_BITMAP_TIMES_ROMAN_24 : GLUT_BITMAP_TIMES_ROMAN_10, (const unsigned char *)string.c_str());	
}